/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Reeks5.VanRansbeeck.Kevin.Model.States.Game;

import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author climacon
 */
public class BlindState implements PokerSpelState {

    public String getStatus() {
        return "Pre-Flop Betting";
    }

    public void blinds(SpelStateContext aThis) {
        try {
            throw new IllegalGameActionException("We zijn al pre-flop");
        } catch (IllegalGameActionException ex) {
            Logger.getLogger(BlindState.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public void flop(SpelStateContext aThis) {
        // als alle spelers geen "newstate" hebben
        aThis.setSpelState(new FlopState());
    }

    public void turn(SpelStateContext aThis) {
        try {
            throw new IllegalGameActionException("We vergeten de flop?!");
        } catch (IllegalGameActionException ex) {
            Logger.getLogger(BlindState.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public void river(SpelStateContext aThis) {
        try {
            throw new IllegalGameActionException("Flop & Turn?");
        } catch (IllegalGameActionException ex) {
            Logger.getLogger(BlindState.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public void showdown(SpelStateContext aThis) {
        // als alle spelers all-in zijn (of alle spelers -1 all-in zijn)
        aThis.setSpelState(new ShowdownState());
    }

    public void winner(SpelStateContext aThis) {
        try {
            throw new IllegalGameActionException("Winnaar kan alleen vanuit showdown state komen.");
        } catch (IllegalGameActionException ex) {
            Logger.getLogger(BlindState.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public void reset(SpelStateContext aThis) {
        try {
            throw new IllegalGameActionException("Reset kan alleen vanuit winnaar state komen.");
        } catch (IllegalGameActionException ex) {
            Logger.getLogger(BlindState.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    
}
